package cn.bandeqing.worker.entity;

import cn.bandeqing.base.domain.CurrentWorkerUser;
import cn.bandeqing.frame.mybatis.config.InsertOrUpdateListener;
import cn.bandeqing.frame.mybatis.entity.BaseEntity;
import cn.bandeqing.worker.req.ModifyLevelReq;
import cn.bandeqing.worker.req.ModifyStatusReq;
import cn.bandeqing.worker.req.WorkerRegisterReq;
import cn.bandeqing.worker.req.WorkerSaveOrUpdateReq;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import io.github.linpeilie.annotations.AutoMapper;
import io.github.linpeilie.annotations.AutoMappers;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

/**
 * 工作人员 实体类。
 *
 * @author fugui
 * @since 2023-12-05
 */
@EqualsAndHashCode(callSuper = true)
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@Table(value = "bdq_worker", onInsert = InsertOrUpdateListener.class, onUpdate = InsertOrUpdateListener.class)
@AutoMappers({
        @AutoMapper(target = WorkerRegisterReq.class, convertGenerate = false),
        @AutoMapper(target = WorkerSaveOrUpdateReq.class, convertGenerate = false),
        @AutoMapper(target = CurrentWorkerUser.class, reverseConvertGenerate = false),
        @AutoMapper(target = ModifyStatusReq.class, convertGenerate = false),
        @AutoMapper(target = ModifyLevelReq.class, convertGenerate = false),
})
public class Worker extends BaseEntity {

    /**
     * 服务人员自增ID
     */
    @Id(keyType = KeyType.Auto)
    private Long workerId;

    /**
     * 服务人员8位编码
     */
    private String workerUuid;

    /**
     * 昵称
     */
    private String workerNickName;

    /**
     * 真实姓名
     */
    private String workerRealName;

    /**
     *
     */
    private String workerPhone;

    /**
     * 身份证号
     */
    private String workerIdCardNumber;

    /**
     * 身份证人像面
     */
    private String workerIdCardFrontUrl;

    /**
     * 身份证国徽面
     */
    private String workerIdCardBackUrl;

    /**
     * 服务人员头像
     */
    private String workerHeadImgUrl;

    /**
     * 0=收纳师 1=搬家小哥
     */
    private WorkerType workerType;

    private WorkerStatus workerStatus;

    private String workerLoginPassword;

    private String workerLoginPasswordSalt;

    /**
     * 紧急联系人
     */
    private String workerEmergencyContact;
    private String workerEmergencyContactPhone;

    /**
     * 民族
     */
    private WorkerNation workerNation;

    private WorkerSex workerSex;

    /**
     * 年龄
     */
    private Integer workerAge;

    /**
     * 注册
     */
    private String workerAddress;

    private Double workerAddressLng;
    private Double workerAddressLat;

    /**
     * 健康证书
     */
    private String workerHealthCertificateUrl;

    /**
     * 工作年限
     */
    private Integer workerYear;

    /**
     * 城市编码code
     */
    private String workerCity;

    private String workerSkills;

    private String workerTools;

    private WorkerLevel workerLevel;

    private Long storeId;

    private String storeName;

    // unipush2 cid
    private String workerCid;

}
